﻿using ReflectionStudio.Core.Events;
using System;
using System.Data;
using System.Windows;
using System.Windows.Data;
using System.ComponentModel;
namespace WPFExcelReport
{
    public partial class TSWFD
    { 
        public TSWFD()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return; 
            MV = new VICC_WFEVENTDEF();
            this.DataContext = MV;
            InitializeComponent(); 
        }
        public override void vwMaster_CurrentChanged(object sender, EventArgs e)
        {
            base.vwMaster_CurrentChanged(sender, e);
            
        }
     
       
        public override void LOADALL()
        {
            dwData = TBMain.NewRow();
            dwData["MANDANT"] = app.Mandant;
            if(ScopeManage=="*"|| ScopeManage == "")
            {

            }
            else
            {
                dwData["WFCLASS"] = " AND WFCLASS='" + ScopeManage + "'";
            }
            SResult =TMV.QWFD05(dwData);
           foreach(DataRow row in SResult.Tables[0].Rows)
            {
                row["DES"] = Helpers.Helper.GetGB2312Value(row["DES"].ToString());
            }
            MergeData(SResult,false); 
        } 
    }
}
